<!DOCTYPE html>
<html lang="en">
<body>
	<div>1,</div>
	<div>2,</div>
	<div>3,</div>
	<div>4</div>
	<script
		src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
	<script>
		(function($) {
			alert($('div').text()); // Alerts "1,2,3,4"  
		})(jQuery);
	</script>
</body>
</html>